//统一管理用户相关的接口
import request from '@/utils/request'
//mock数据
// enum API {
//   LONGIN_URL = '/user/login',
//   USERINFO_URL = '/user/info',
// }
// //登录接口的方法
// export const reqLogin = (data: any) => request.post<any>(API.LONGIN_URL, data)
// //获取用户信息的接口方法
// export const reqUserInfo = () => request.get<any>(API.USERINFO_URL)

//真实的接口

enum API {
  LONGIN_URL = '/admin/acl/index/login',
  USERINFO_URL = '/admin/acl/index/info',
  LOGOUT_YRL = '/admin/acl/index/logout',
}
//登录接口的方法
export const reqLogin = (data: any) =>
  request.post<any, any>(API.LONGIN_URL, data)
//获取用户信息的接口方法
export const reqUserInfo = () => request.get<any>(API.USERINFO_URL)

//退出登录
export const reqLogout = () => request.post<any>(API.LOGOUT_YRL)
